package Homework4;

import java.util.*;

public class TestMyIntegerArray {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int n;
        n = input.nextInt();
        int[] arr = new int[n];
        for(int i=0;i<arr.length;i++)
            arr[i]=input.nextInt();
        MyIntegerArray marr1 =new MyIntegerArray(arr);
        marr1.printArray();
        System.out.println(marr1.getMax());
        System.out.println(marr1.getMin());
        System.out.println(marr1.getAvg());
        MyIntegerArray marr2 =new MyIntegerArray(arr.length);
        for(int i=0;i<marr2.length();i++)
            marr2.setElement(i,arr[i]*arr[i]);
        for(int i=0;i<marr2.length();i++)
            System.out.print(marr2.getElement(i)+" ");
        System.out.println();
    }
}
